<?php
defined('__JF')
		or die('Direct access is not allowed');

/*
 * Created on 30.11.2008
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
class JF_AbstractController implements JF_IController {

	private $isRequest 			= false;

	private $aURIParameters 	= array();

	private $aPostParameters	= array();

	private $aParameters		= array();

	private $sURI				= '';

	public function isRequest($isRequest = null) {
		if ($isRequest !== null) {
			$this->isRequest = (bool) $isRequest;
		}

		return $this->isRequest;
	}

	public function setURI($sURI) {
		$this->sURI = $sURI;
	}

	public function getURI() {
		return $this->sURI;
	}

	public function setURIParameters(array $aURIParameters) {
		$this->aURIParameters = $aURIParameters;
	}

	public function getURIParameters() {
		return $this->aURIParameters;
	}

	public function getURIParameter($sId) {
		if (isset($this->aURIParameters[$sId])) {
			return $this->aURIParameters[$sId];
		}
		else {
			return null;
		}

	}

	public function setPostParameters(array $aPostParameters) {
		$this->aPostParameters = $aPostParameters;
	}

	public function getPostParameters() {
		return $this->aPostParameters;
	}

	public function getPostParameter($sId) {
		if (isset($this->aPostParameters[$sId])) {
			return $this->aPostParameters[$sId];
		}
		else {
			return null;
		}

	}

	public function setParameters(array $aParameters) {
		$this->aParameters = $aParameters;
	}

	public function getParameters() {
		return $this->aParameters;
	}

	public function getParameter($sId) {
		if (isset($this->aParameters[$sId])) {
			return $this->aParameters[$sId];
		}
		else {
			return null;
		}

	}

	public function execute() {}
}